#include <iostream>
#include <iomanip>
using namespace std;
int main()
{
    int N;
    cin >> N;
    float sum = 1;
    int numerator = 1;
    int denominator = 1;
    for(int  i = 1; i<N; i++)
    {
        numerator = numerator + 1;
        denominator = denominator + 2;
        float item = numerator/(float)(denominator);
        if(i%2 == 1)
            item = -1 * item;
        sum = sum + item;
    }
    cout << fixed << setprecision(3) <<sum << endl;
}